package com.xbongbong.pro.statistic.pojo;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
import java.util.Objects;

/**
 * @ClassName DwTriggerConditionLogPojo
 * @Description 数据预警：触发条件的日志数据
 * @Author mengna.Deng
 * @Date 2021/4/16 20:16
 * @Version 1.0
 */
@Getter
@Setter
@ToString
public class DwTriggerConditionPojo implements Serializable {
    private static final long serialVersionUID = -1L;
    /**
     * id,attr和formId拼接成唯一值，前端需要
     */
    private String id;

    /**
     * 字段类型
     */
    private String attr;
    /**
     * 字段名称
     */
    private String attrName;
    /**
     * 筛选条件
     */
    private String symbol;
    /**
     * 筛选条件名称
     */
    private String symbolName;
    /**
     * 字段对应的值
     */
    private List<BigDecimal> value;
    /**
     * formId
     */
    private Long formId;
    /**
     * businessType
     */
    private Integer businessType;
    /**
     * appId
     */
    private Long appId;
    /**
     * menuId
     */
    private Long menuId;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        DwTriggerConditionPojo that = (DwTriggerConditionPojo) o;
        return Objects.equals(attr, that.attr) &&
                Objects.equals(symbol, that.symbol) &&
                Objects.equals(value, that.value) &&
                Objects.equals(formId, that.formId) &&
                Objects.equals(businessType, that.businessType)&&
                Objects.equals(appId, that.appId) &&
                Objects.equals(menuId, that.menuId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(attr, symbol, value, formId, businessType,appId,menuId);
    }
}
